package com.shuwang.jh_shop.ui.adapter
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
class TabFragmentPagerAdapter(fm: FragmentManager, private val mTitles: List<String>, newsFragmentList: List<Fragment>) : FragmentPagerAdapter(fm) {
    private var mNewsFragmentList:List<Fragment> = newsFragmentList

    override fun getPageTitle(position: Int): CharSequence {
        return mTitles[position]
    }

    override fun getItem(position: Int): Fragment {
        return mNewsFragmentList[position]
    }

    override fun getCount(): Int {
        return mNewsFragmentList.size
    }

}
